import request from 'src/utils/request'
const base_2 = import.meta.env.DEV ? 'http://localhost:3019/shenwenyi' : ''


// 设备列表
export function deviceList(data) {
    return request({
        url: '/serve/equipment/list',
        method: 'post',
        data
    })
}

// 获取项目管理列表数据
export function projectList(data) {
    return request({
        url: '/resource/village/query',
        method: 'post',
        data
    })
}

// 设备删除
export function deviceDelete(data) {
    return request({
        url: '/serve/equipment/del',
        // url: base_2+'/serve/equipment/del',
        method: 'post',
        data
    })
}

// 查询设备是否有任务
export function checkIfDevice(data) {
    return request({
        url: '/serve/equipment/check',
        // url: base_2+'/serve/equipment/check',
        method: 'post',
        data,
    })
}

// 有点位任务时的删除
export function delWorkByEquipmente(data) {
    return request({
        url: '/serve/equipment/delWorkByEquipment',
        // url: base_2+'/serve/equipment/delWorkByEquipment',
        method: 'post',
        data,
    })
}
// 设备管理根据id查询详情
export function deviceDetail(data) {
    return request({
        url:'/serve/equipment/details',
        method: 'post',
        data
    })
}

// 设备编辑
export function deviceEdit(data) {
    return request({
        url: '/serve/equipment/update',
        method: 'post',
        data
    })
}

// 设备新增
export function deviceAdd(data) {
    return request({
        url: '/serve/equipment/add',
        method: 'post',
        data
    })
}

// // 巡检点位下载二维码
// export function downLoadCode(data) {
//     return request({
//         url: '/resource/village/query',
//         method: 'post',
//         data
//     })
// }


